﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using Class_DAO;

namespace Project_QuangCaoABC
{
    public partial class frmReport : Form
    {
        public frmReport()
        {
            InitializeComponent();
        }

        private void frmReport_Load(object sender, EventArgs e)
        {
            string sql = "select * from HopDong";
            string stconet = DataProvider.GetBaoCao();
            SqlDataAdapter da = new SqlDataAdapter(sql, stconet);
            QuangCaoABCDataSet ds = new QuangCaoABCDataSet();
            da.Fill(ds, "HopDong");
            rptHopDongQuangCao rphd = new rptHopDongQuangCao();
            rphd.SetDataSource(ds);
            ReportViewer_HopDong.ReportSource = rphd;
        }
    }
}
